-- CALC_AVALON_CANNON_ATTACK_RANGE

-- 计算阿瓦隆巨炮的攻击范围
return function(avalonCannon)
    local attackRange = AvalonCannonM.query(avalonCannon.classId, "init_range");

    -- 范围加成
    local prop = PropM.combine(avalonCannon, "attrib2", "attack_range");
    attackRange = PropM.apply(prop, attackRange);

    -- 范围达到5时，变成全场攻击
    if attackRange >= 5 then
        attackRange = 9;
    end

    -- 映射为位置数组
    local posList = FormulaM.invoke("CALC_AVALON_CANNON_ATTACK_POS", avalonCannon, attackRange);

    return posList;
end
